import Flutter
import UIKit

public class SwiftAliLogPlugin: NSObject, FlutterPlugin {
  public static func register(with registrar: FlutterPluginRegistrar) {
    let channel = FlutterMethodChannel(name: "ali_log", binaryMessenger: registrar.messenger())
    let instance = SwiftAliLogPlugin()
    registrar.addMethodCallDelegate(instance, channel: channel)
  }

  public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
    if(call.method.elementsEqual("getPlatformVersion")){
        result("iOS " + UIDevice.current.systemVersion)
    } else if(call.method.elementsEqual("postDartError")){
        result("iOS postDartError")
    } else if(call.method.elementsEqual("postHttpLog")){
        result("iOS postHttpLog")
    } else {
        
    }
  }
}
